<?php
/**
 * Created by PhpStorm.
 * User: Vlad
 * Date: 2/8/14
 * Time: 10:15 AM
 */

class BaseController
{
    protected $urlValues;
    protected $action;

    public function __construct($action, $urlValues)
    {
        $this->action = $action;
        $this->urlValues = $urlValues;

        DB::Connect();
    }

    public function ExecuteAction()
    {

        return $this->{$this->action}();
    }

    protected function ReturnView($viewModel)
    {
        $viewLocation = 'MVC/View/' . get_class($this) . '/' . $this->action . '.php';

        require($viewLocation);
    }
} 